package com.example.jzg.mvpdemo.Utils;
/**
 * author: gcc
 * date: 2016/12/5 15:18
 * email:
 */

import android.content.Context;

import com.afollestad.materialdialogs.MaterialDialog;
import com.example.jzg.mvpdemo.R;

/**
 * author: guochen
 * date: 2016/12/5 15:18
 * email: 
 */
public class LoadingDialog {

    private static MaterialDialog dialog;

    public static void showDialog(Context appContext){
        //                .title(R.string.title)
//                .positiveText(R.string.agree)
        dialog = new MaterialDialog.Builder(appContext)
//                .title(R.string.progress_dialog)
                .content(R.string.content)
                .progress(true, 0)
                .cancelable(false)
                .progressIndeterminateStyle(false)
                .show();

    }

    public static void hideDialog(){
        if(dialog!=null&&dialog.isShowing()){
            dialog.dismiss();
        }
    }
}
